<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../vue.js"></script>
</head>
<body>
<div id="app">
    <div v-if="show">
        用户名: <input type="text" key="username"/>
        <!--key值解决input复用问题-->
    </div>
    <div v-else>
        邮箱名: <input type="text" key="email"/>
    </div>
    <!--<div v-else-if="show==='b'">this is B</div>-->
    <!--<div v-else>this is others</div>-->
    <!--<div v-show="show">{{message}}</div>-->
</div>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            show:false,
//            message:"hello world"
        }
    })
</script>
</body>
</html>